package com.george.model.user.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.sun.org.apache.xpath.internal.operations.Bool;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 *
 * </p>
 *
 * @author GeorgeChan 2019/5/16 14:10
 * @version 1.0
 * @since jdk1.8
 */
@TableName("employee")
public class Employee extends Model<Employee> {
    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;
    private String name;
    private Integer sex;
    private String email;
    private String address;
    private BigDecimal salary;
    /**
     * 删除标记;0-未删除;1-已删除
     */
    @TableField("delete_flag")
    @TableLogic
    private Boolean deleteFlag;

    public Employee() {
    }

    public Employee(Long id, String name, Integer sex, String email, String address, BigDecimal salary, Boolean deleteFlag) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.email = email;
        this.address = address;
        this.salary = salary;
        this.deleteFlag = deleteFlag;
    }

    public Employee(Long id, String name, Integer sex, String email, String address, BigDecimal salary) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.email = email;
        this.address = address;
        this.salary = salary;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public BigDecimal getSalary() {
        return salary;
    }

    public void setSalary(BigDecimal salary) {
        this.salary = salary;
    }

    public Boolean getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Boolean deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                ", email='" + email + '\'' +
                ", address='" + address + '\'' +
                ", salary=" + salary +
                ", deleteFlag=" + deleteFlag +
                '}';
    }
}
